Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't attempt to start or stop charging a disconnected car #577

Closed
wants to merge 1 commit into from

Conversation

RichieB2B
Copy link

This works quite well. I turned on my car Kriek but did not plug it in for a while.

2024-04-26 08:27:26,379 - 🚗 TeslaAPI 13 Kriek not ready because it wasn't woken in the last 2 minutes.
2024-04-26 08:27:26,380 - 🚗 TeslaAPI 13 car_api_charge return because car_api_available() == False
2024-04-26 08:27:27,260 - 🚗 TeslaAPI 13 Entering car_api_available - next step is to query Tesla API
2024-04-26 08:27:27,414 - 🚗 TeslaAPI 13 Car API cmd https://127.0.0.1:4443/api/1/vehicles/<Kriek VIN> <Response [200]>
2024-04-26 08:27:27,415 - 🚗 TeslaAPI 13 car_api_available returning True
2024-04-26 08:27:27,416 - 🚗 TeslaAPI 13 startOrStop is set to start
2024-04-26 08:27:27,416 - 🚗 TeslaAPI 13 Don't charge Big Red because vehicle.stopAskingToStartCharging == True
2024-04-26 08:27:36,599 - 🚗 TeslaAPI 13 Car API cmd https://127.0.0.1:4443/api/1/vehicles/<Kriek VIN>/vehicle_data?endpoints=location_data%3Bcharge_state%3Bdrive_state <Response [408]>
2024-04-26 08:27:36,600 - 🚗 TeslaAPI 20 ERROR: Can't access vehicle status for Kriek.  Will try again later.
2024-04-26 08:27:36,601 - 🚗 TeslaAPI 13 updateCarApiLastErrorTime() called due to Tesla API Error. Updating timestamp from 0 to 1714112856.6009448
2024-04-26 08:27:36,601 - 🚗 TeslaAPI 20 Kriek is disconnected.  Do not start charge.
2024-04-26 08:28:36,332 - 🚗 TeslaAPI 13 Car API cmd wake_up<Response [200]>
2024-04-26 08:28:36,333 - 🚗 TeslaAPI 13 car_api_available returning True
2024-04-26 08:28:41,338 - 🚗 TeslaAPI 13 startOrStop is set to start
2024-04-26 08:28:41,339 - 🚗 TeslaAPI 13 Don't charge Big Red because vehicle.stopAskingToStartCharging == True
2024-04-26 08:28:41,339 - 🚗 TeslaAPI 13 Kriek not ready because of recent lastErrorTime 1714112856.6009448
...
2024-04-26 08:44:40,276 - 🚗 TeslaAPI 13 Entering car_api_available - next step is to query Tesla API
2024-04-26 08:44:40,277 - 🚗 TeslaAPI 13 car_api_available returning True
2024-04-26 08:44:40,278 - 🚗 TeslaAPI 13 startOrStop is set to start
2024-04-26 08:44:40,278 - 🚗 TeslaAPI 13 Don't charge Big Red because vehicle.stopAskingToStartCharging == True
2024-04-26 08:44:40,279 - 🚗 TeslaAPI 20 Kriek is disconnected.  Do not start charge.
...
2024-04-26 08:45:05,727 - ⛽ Master   20 Charge Session Started for Slave TWC 2119
2024-04-26 08:45:05,737 - ⛽ Slave    20 SHB 2119: 09 02.29/06.00A 0000 0000  M: 00 00.00/00.00A 0000 0000
2024-04-26 08:45:05,738 - ⛽ Slave    20 Slave power for TWCID 2119, status: 9
2024-04-26 08:45:07,431 - 🚗 TeslaAPI 13 Entering car_api_available - next step is to query Tesla API
2024-04-26 08:45:07,431 - 🚗 TeslaAPI 13 car_api_available returning True
2024-04-26 08:45:07,829 - 🚗 TeslaAPI 13 Car API cmd https://127.0.0.1:4443/api/1/vehicles/<Big Red VIN> <Response [200]>
2024-04-26 08:45:08,664 - 🚗 TeslaAPI 13 Car API cmd https://127.0.0.1:4443/api/1/vehicles/<Big Red VIN>/vehicle_data?endpoints=location_data%3Bcharge_state%3Bdrive_state <Response [200]>
2024-04-26 08:45:08,909 - 🚗 TeslaAPI 13 Car API cmd https://127.0.0.1:4443/api/1/vehicles/<Kriek VIN>/vehicle_data?endpoints=location_data%3Bcharge_state%3Bdrive_state <Response [200]>
2024-04-26 08:45:08,922 - ⛽ Manager  20 Vehicle <Kriek VIN> on TWC 2119 is permitted to charge.
2024-04-26 08:45:09,653 - ⛽ Slave    20 SHB 2119: 01 05.70/06.00A 0000 0000  M: 00 00.00/00.00A 0000 0000
2024-04-26 08:45:09,654 - ⛽ Slave    20 Slave power for TWCID 2119, status: 1
2024-04-26 08:45:11,698 - 📊 MQTT     13 Publishing MQTT Topic TWC/2119/ampsInUse (value is 6.23)
2024-04-26 08:45:11,699 - 📊 MQTT     13 Publishing MQTT Topic TWC/2119/state (value is 1)
2024-04-26 08:45:11,700 - 📊 MQTT     13 Publishing MQTT Topic TWC/2119/carsCharging (value is 1)

Fixes #576

@RichieB2B
Copy link
Author

This is a bad idea. See discussion in #576

@RichieB2B RichieB2B closed this Apr 29, 2024
@RichieB2B RichieB2B deleted the dont-charge-disconnected branch April 29, 2024 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A "disconnected" car is never charged when it is plugged in later
1 participant